<?php
 namespace App\Http\Controllers; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\View; use TechOnline\Laravel\Dao\ModelUtil; use TechSoft\Laravel\Mod\ModTemplateViewTrait; class BaseModController extends Controller { use ModTemplateViewTrait; public function __construct() { $nav = ModelUtil::all('nav', ['type' => 'head'], ['*'], ['sort', 'asc']); View::share('_navHead', $nav); $navFoot = ModelUtil::all('nav', ['type' => 'head'], ['*'], ['sort', 'asc']); View::share('_navFoot', $navFoot); } } 